<template>
    <div>
        <h1>计数器</h1>
        <div>{{$store.state.count}}</div>
        <button @click="add">+</button>
    </div>
</template>

<script>
export default {
    methods:{
        add(){
            this.$store.commit('INCREMENT_COUNT',2)
        }
    }
}
</script>

<style>

</style>